import request from "@/utils/request";

export const getEbooks = (categoryId2)=>{
    return request.get('/ebooks/'+categoryId2)
}

export const saveEbook = (ebookPo)=>{
    return request.post('/ebooks/addEbook',ebookPo)
}

export const getEbooksByPage = (findEbookPo)=>{
    return request.post('/ebooks/findEbooks',findEbookPo)
}   
export const getEbookById = (id)=>{
    return request.get('/ebooks/findEbookById/'+id)
}

export const updateEbook = (ebookPo)=>{
    return request.post('/ebooks/updateEbookById',ebookPo)
}

export const deleteById = (ebook)=>{
    return request.post('/ebooks/deleteById',ebook)
}